# x,y,z=12,5,6
# small = x if x<y and x<z  else y if y<z else z
# print(small)
# x,y,z=1,2,3
# x,y,z=y,z,x
# print(x,y,z)
def inpt(x,y):
    x = input('请输入用户名：')
    y = input('请输入密码：')
    while '*' in x or '*' in y:
        print('用户名和密码终不能带*号！')
        # inpt(x,y)
        x = input('请输入用户名：')
        y = input('请输入密码：')
    return x,y
n=2
username,password=inpt('100','200')
while  n>=0:
    if username == password:
        print('登陆成功！')
        break
    elif username != password and n>0:
        print('用户名或密码错误！请重新输入！')
        print('还有%s次机会！'%n)
        username,password = inpt('100', '200')
        n -=1
    else :
        print('输入错误三次，登录失败！')
        break

